<template>
  <img alt="Vue logo" src="./assets/logo.png" />
  <com-title msg="Hello Vue 3 + Vite" />
</template>
<script setup>
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup

import {getCurrentInstance, nextTick} from "vue";
const self = getCurrentInstance()
// 把Vue实例暴露出去供动态组件调用
window.appVue = self.appContext.app
nextTick(() => {
  console.log(window.appVue)
  console.log(window.appVue.component('com-title'))
  console.log(window.appVue.component('com-title').a)
})
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
